function overlaps(start1, end1, start2, end2) {
    if (!isNull(start1) && !isNull(end1) && !isNull(start2) && !isNull(end1)) {
        var startDate1 = new Date(start1).getTime();
        var endDate1 = new Date(end1).getTime();
        var startDate2 = new Date(start2).getTime();
        var endDate2 = new Date(end2).getTime();
        return ((startDate1 <= endDate2 && startDate2 <= endDate1) || start1 == start2);
    } else {
        return false;
    }
}
